<?php //require_once TEMPLATEPATH.'/incs/resize_image.php';?>
<script type="text/javascript" src="<?php bloginfo('template_url');?>/js/mysubscriber.js"></script>
<div id="sidebar">
        	<ul class="widgets">
            	<li class="widget">
                	<div class="box-bg whychooseus">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3>Why Choose Us</h3>
                        <?php require_once TEMPLATEPATH.'/views/whychossenus/view-why-choosen-us.php';?>
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg supportonline">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3>Support Online</h3>
                        	<?php require_once TEMPLATEPATH.'/views/support/process-support-online.php';?>
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg tourbest">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3><span class="left">Tour</span><span class="right"> Best !!</span></h3>                        	
                        <?php require_once TEMPLATEPATH.'/views/tour/view-tour-best.php';?>
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg getour">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3>Get Our</h3>
                        	<span class="hotline">
                            	Travel Guides
                            </span>                        
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg specialoffers">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3>Special offers</h3>
                        	<span class="hotline">Enter your email address and we will send you our regular promotiona mails.
                            </span>                
                            <form action="" method="get">
                                <p>
                                    <input type="text" id="submit_subscriber" onblur="if(this.value=='') this.value='Enter your email address'" onfocus="if(this.value=='Enter your email address')this.value=''" value="Enter your email address" />                                    
                                    <input type="submit" value="" rel="<?php bloginfo('home');?>/process-request" id="go_subscriber"/>
                                    <div id="subscriber_show" style="color: red;"></div>
                                </p>
                            </form>                                    
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg bestmenu">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3><span class="left">Best</span><span class="right"> Menu !</span></h3>
                        <?php
                        	global $wpdb,$term_bar;
                        	$advBar = get_bloginfo('template_url')."/images/bestmenu.png";
	                        $num_post 			= 1; 
							$post_type			= 'adv'; 
							$taxonomy			= 'show-on-page'; 	
							$field				= 'slug'; 
							$metakey 			= $wpdb->prefix.'display2';
							$metavalue			= 'display';
							//echo 'adfa:'.$advBar;
							$args = db_query_posts_in_terms_child_nopage($num_post, $post_type, $taxonomy, $field, $term_bar, $metakey, $metavalue);
							query_posts($args);
							$discount = 0;
													
							if(have_posts())
							{
								the_post();
								$postID = get_the_ID();
								$url = get_post_meta($postID, $wpdb->prefix.'url',true);
								$discount = get_post_meta($postID, $wpdb->prefix.'discount',true);
								if(!$discount)
									$discount = 0;
								$thumb_banner = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
								if($thumb_banner)
									$advBar = $thumb_banner;
							}
								?>
								<a href="<?php echo $url;?>">
	                        	<img alt="" src="<?php echo $advBar;?>" width="222" height="122"/>
	                        	</a> 
	                        	<a href="">
	                        	<span style="font-size: 19px; font-weight: bold; z-index: 25; position: absolute; right: 51px; top: -1px; color: #A00F0A;"><?php echo $discount;?></span>
	                        	</a>							                     
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg memberlink">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3>Member Link</h3>
                        <?php
                        $bookmark = get_bookmarks() ;                                              
                        ?>
                        <ul>
                        <?php
                         foreach ($bookmark as $value) 
                         {
                         ?>
                         <li><a target="<?php echo $value->link_target;?>" href="<?php echo $value->link_url;?>" title=<?php echo $value->link_description;?>><?php echo $value->link_name;?></a></li>
                         <?php 
                         }
                        ?>                            
                        </ul>
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
                <li class="widget">
                	<div class="box-bg partners">
                    	<span class="top-box"></span>
                        <span class="icon-box"></span>
                        <div class="content-box">
                        <h3>Partners</h3>                        	
                        <?php require_once TEMPLATEPATH.'/views/partner/view-partner.php';?>
                        </div>
                        <span class="bot-box"></span>                        
                    </div>
                </li>
            </ul>
        </div>